﻿
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace SHKF.B2C.Model.Entity.Order
{
    /// <summary>
    /// 定单类
    /// </summary>
    [SugarTable("OrderContent")]
    public class OrderContentEntity : BaseEntity2
    {
        /// <summary>
        /// 店铺虚拟SN
        /// </summary>
        public int ShopSN { get; set; }

        /// <summary>
        /// 如果第三方的唯一键是字符串，会存在此处
        /// </summary>
        public string ID { get; set; }

        [SugarColumn(IsPrimaryKey = true)]
        public new long SN { get; set; }

        public string Platform { get; set; }

        public OrderContentEntity()
        {
            total_weight = 0;
        }

        /// <summary>
        /// 订单号，数据库中请用bigint(20)存储此字段
        /// </summary>
        public long order_id { get; set; }

        /// <summary>
        /// 订单展示ID，
        /// 与用户端、商家端订单详情中展示的订单号码一致。数据库中请用bigint(20)存储此字段
        /// </summary>
        public long wm_order_id_view { get; set; }

        /// <summary>
        /// 商家门店名称，即平台上当前订单所属门店的名称。
        /// </summary>
        public string wm_poi_name { get; set; }

        /// <summary>
        /// 商家门店地址
        /// </summary>
        public string wm_poi_address { get; set; }

        /// <summary>
        /// 商家门店联系电话
        /// </summary>
        public string wm_poi_phone { get; set; }

        /// <summary>
        /// 订单收货人地址
        /// </summary>
        public string recipient_address { get; set; }

        /// <summary>
        /// 订单收货人联系电话
        /// </summary>
        public string recipient_phone { get; set; }

        /// <summary>
        /// 订单收货人姓名
        /// </summary>
        public string recipient_name { get; set; }
  
        /// <summary>
        /// 订单的实际在线支付总价，单位是元。
        /// 此字段数据为用户实际支付的订单总金额，含打包袋、配送费等
        /// </summary>
        public decimal total { get; set; }

        /// <summary>
        /// 优惠前商品总价
        /// </summary>
        public decimal total_fee { get; set; }
  
        /// <summary>
        /// 订单备注信息
        /// </summary>
        public string caution { get; set; }

        /// <summary>
        /// 配送员联系电话
        /// </summary>
        public string shipper_phone { get; set; }

        /// <summary>
        /// 订单状态
        /// 1-用户已提交订单；2-向商家推送订单；4-商家已确认；8-订单已完成；9-订单已取消
        /// </summary>
        public int status { get; set; }


        /// <summary>
        /// 是否支持开发票：0-不支持，1-支持
        /// </summary>
        public int has_invoiced { get; set; }

        /// <summary>
        /// 发票抬头，为用户填写的开发票的抬头
        /// </summary>
        public string invoice_title { get; set; }

        /// <summary>
        /// 订单创建时间，为10位秒级的时间戳
        /// </summary>
        public DateTime ctime { get; set; }

        /// <summary>
        /// 订单更新时间，为10位秒级的时间戳
        /// </summary>
        public DateTime utime { get; set; }

        /// <summary>
        /// 预计送达时间 秒级
        /// </summary>
        public DateTime delivery_time { get; set; }

        /// <summary>
        /// 当日订单流水号，门店每日已支付订单的流水号从1开始。
        /// </summary>
        public int day_seq { get; set; }

        /// <summary>
        /// 订单重量（该信息默认不返回，可在开发者中心订阅），单位为克/g
        /// </summary>
        public long total_weight { get; set; }

        /// <summary>
        /// 配送状态 -1: 0:已配送
        /// </summary>
        public int logistics_status { get; set; }
          
        public DateTime pDate { get; set; }

        /// <summary>
        /// 商家应收款
        /// </summary>
        public decimal poiReceive { get; set; }
    }
}
